package com.ciaojian.worker.model.param;

import cn.hutool.core.bean.BeanUtil;
import com.ciaojian.core.model.Worker;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author oxiny
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class WorkerDTO extends BaseDTO<Worker> {

    @ApiModelProperty("/发型师Id")
    private Integer id;

    @ApiModelProperty("/门店ID")
    private Integer storeId;

    @ApiModelProperty("是否机动组成员")
    private Boolean motor;

    public Worker convert() {
        Worker worker = Worker.builder().build();
        BeanUtil.copyProperties(this, worker, new String[0]);
        return worker;
    }
}
